import { mode as DEV_MODE } from "./mode" // * DON'T DELETE
import { app, BrowserWindow, screen } from "electron"

app.whenReady().then(() => {
	let screenSize = screen.getPrimaryDisplay().size
	let win = new BrowserWindow({
		width: screenSize.width - 450,
		height: screenSize.height - 170,
	})

	// * ========== DEV TOOL INSIDE =============||
	// @ts-ignore                             //*||
	if (DEV_MODE === "dev") {                 //*||
		win.loadURL("http://localhost:3000/") //*||
	} else {                                  //*||
		win.loadFile("dist/view/index.html")  //*||
	}                                         //*||
	// * ========================================||

	// * YOUR CODE HERE
})

// * YOUR CODE HERE

// * ============ DEV TOOL INSIDE ==========||
// @ts-ignore                            //*||
try {                                    //*||
	require('electron-reloader')(module) //*||
} catch {}                               //*||
// * =======================================||
// * HERE IS THE END